package com.zystest01.demo.service;

import com.zystest01.demo.mapper.ManhleMapper;
import com.zystest01.demo.pojo.Manhle;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ManhleService {
    @Autowired
    ManhleMapper mapper;

    @Cacheable(cacheNames = "emp")
    public Manhle getManhleByCuid( String cuid){
        return mapper.getManhleByCuid(cuid);
    }

    @Cacheable(cacheNames = "tmp")
    public List<Manhle> getManhle(){
        return mapper.getManhle();
    }
}
